<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>

<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<jsp:include page="/core/tool/resources.jsp"></jsp:include>
	<script src="./market.js"></script>
	<script src="../../smdc/security/secselect.js"></script>

</head>

<body>

	<div id="update_dialog" class="easyui-dialog" title="My Dialog" style="width:500px;height:300px;"   
	        data-options="iconCls:'icon-save',resizable:true,modal:true, closed:true, 
	        toolbar:[{text:'Update',iconCls:'icon-reload',handler:click_update,plain:false},
	        	{text:'UpdateAll',iconCls:'icon-reload',handler:click_update_all,plain:false}]
	        ">   
	 	 <form id="update_param" style="margin:5px">
			编码: <input name="secId" data-options="width:150"/>
			日期: <input class="easyui-datebox" name="beginDate"/>
		</form>
	</div>

	<div id="toolbar" style="margin-bottom:5px">
		<a class="easyui-linkbutton" iconCls="icon-reload" onclick="click_open_update()">Update</a>
		<a class="easyui-linkbutton" iconCls="icon-edit" onclick="click_row_edit()">编辑</a>
		<a class="easyui-linkbutton" iconCls="icon-add" onclick="click_row_add()">新增</a>
		<form id="search_param">
			代码: <input name="secId" data-options="	width:150">
			开始日期: <input class="easyui-datebox" name="beginDate"/>
			结束日期: <input class="easyui-datebox" name="endDate"/>
			<a class="easyui-linkbutton" iconCls="icon-search" onclick="click_search()">Search</a>
		</form>
	</div>

	<table id="dg"
		data-options="toolbar:'#toolbar', singleSelect:true, collapsible:true, rownumbers:true, fit:true,
				 	sortOrder:'desc,asc', sortName:'tradeDate,secId', multiSort:true, pagination:true, pageSize:20
			">
		<thead>
			<tr>
				<th data-options="field:'secId',width:80,sortable:true">代码</th>
				<th data-options="field:'secName',width:90">名称</th>
				<th data-options="field:'tradeDate', width:100, editor:'datetimebox', sortable:true">交易日期</th>
				
				<th data-options="field:'closePrice', width:80, align:'right', editor:{type:'numberbox',options:{precision:4}}">价格</th>
				<th data-options="field:'percent', width:70, align:'right', editor:{type:'numberbox',options:{precision:2,measure:'percent'}}">涨跌%</th>
				<th data-options="field:'secNav', width:70, align:'right', editor:{type:'numberbox',options:{precision:4}}">净值</th>
				<th data-options="field:'isOpen', width:70, align:'right', editor:{type:'textbox'}">是否开盘</th>
				
				<th data-options="field:'turnoverValue', width:90, align:'right', editor:{type:'numberbox',options:{measure:'wan'}}">成交量</th>
				<th data-options="field:'buy1', width:80, align:'right', editor:{type:'numberbox',options:{precision:3}}">买一</th>
				<th data-options="field:'sell1', width:80, align:'right', editor:{type:'numberbox',options:{precision:3}}">卖一</th>

				<th data-options="field:'peWeighted', width:70, align:'right', editor:{type:'numberbox',options:{precision:4}}">PE</th>
				<th data-options="field:'pbWeighted', width:70, align:'right', editor:{type:'numberbox',options:{precision:4}}">PB</th>
				<th data-options="field:'roeWeighted', width:70, align:'right', editor:{type:'numberbox',options:{precision:2,measure:'percent'}}">ROE</th>
				<th data-options="field:'diviWeighted', width:70, align:'right', editor:{type:'numberbox',options:{precision:2,measure:'percent'}}">股息率</th>
				<th data-options="field:'divi', width:80, align:'right', editor:{type:'numberbox',options:{precision:2}}">全收益</th>
				
				<th data-options="field:'adjFactor', width:70, align:'right', editor:{type:'numberbox',options:{precision:2}}">累计复权</th>
			</tr>
		</thead>
	</table>

	<div id="dlg-toolbar">
	   <a class="easyui-linkbutton" iconCls='icon-save' onclick="dlg_click_save()">保存</a>
       <a class="easyui-linkbutton" iconCls="icon-remove" onclick="dlg_click_delete()">删除</a>
       <a class="easyui-linkbutton" iconCls="icon-undo" onclick="dlg_click_cancle()">取消</a>
	</div>

    <div id="dlg" class="easyui-dialog" style="padding:10px 30px 20px 30px"
    	data-options="title:'股价管理',modal:true,toolbar:'#dlg-toolbar',resizable:true, width:550, height:300">
		<form id="ff" method="post" ajax="true" class="easyui-flexform" data-options="cellMargin:3, labelAlign:'left'">
			<input name="billId" type="hidden"/>
			<input name="acountId" type="hidden"/>
			<div>
				<label>代码:</label>
				<div><input name="secId" data-options="width:100"></div>
			</div>
			<div>
				<label>日期:</label>
				<div><input class="easyui-datebox" name="tradeDate" data-options=""/></div>
			</div>
			<div>
				<label>前收盘价:</label>
				<div><input class="easyui-numberbox" name="preClosePrice" data-options="precision:4"/></div>
			</div>
			<div>
				<label>开盘价:</label>
				<div><input class="easyui-numberbox" name="openPrice" data-options="precision:4"/></div>
			</div>
			<div>
				<label>收盘价:</label>
				<div><input class="easyui-numberbox" name="closePrice" data-options="precision:4"/></div>
			</div>
			<div>
				<label>最高价:</label>
				<div><input class="easyui-numberbox" name="highPrice" data-options="precision:4"/></div>
			</div>
			<div>
				<label>最低价:</label>
				<div><input class="easyui-numberbox" name="lowPrice" data-options="precision:4"/></div>
			</div>
			<div>
				<label>涨跌:</label>
				<div><input class="easyui-numberbox" name="percent" data-options="readonly:true,precision:2,measure:'percent'"/></div>
			</div>
			<div>
				<label>净值:</label>
				<div><input class="easyui-numberbox" name="secNav" data-options="precision:4"/></div>
			</div>
			<div>
				<label>是否开盘:</label>
				<div><input class="easyui-combobox" name="isOpen" data-options="flexset:'BASE_TRUEFALSE'"/></div>
			</div>
			<div>
				<label>PE:</label>
				<div><input class="easyui-numberbox" name="peWeighted" data-options="precision:4"/></div>
			</div>
			<div>
				<label>PB:</label>
				<div><input class="easyui-numberbox" name="pbWeighted" data-options="precision:4"/></div>
			</div>
		</form>
	 </div>
</body>
</html>
